<script setup lang="ts">
import { useCounterStore } from "./store/counter"
// store中有状态和函数

const store = useCounterStore();
</script>
<template>
  <h1>{{ store.counts }}</h1>
  <button @click="store.update()">count++</button>
</template>
<style scoped>
h1 {
  color: red;
}

button {
  background-color: blue;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
</style>